﻿using System;
using System.Collections.Generic;
using Sripirom.ATS.Core.Querying;

namespace Sripirom.ATS.Core.Domain
{
    public interface IReadOnlyRepository<T, TId> where T : IAggregateRoot 
    {
        T FindBy(TId id);
        IEnumerable<T> FindAll();
        IEnumerable<T> FindAll(int index, int count);
        IEnumerable<T> FindBy(Query query);
        IEnumerable<T> FindBy(Query query, int index, int count);
        Int32 CountAll();
        Int32 CountBy(Query query);   

        IEnumerable<T> FindFiltered(Criterion criterion);


    }
}
